Optimal. Leaf size=140 \[ -\frac {\sqrt {7} E\left (\frac {1}{2} (c+\pi +d x)|\frac {8}{7}\right )}{3 d}+\frac {F\left (\frac {1}{2} (c+\pi +d x)|\frac {8}{7}\right )}{3 \sqrt {7} d}-\frac {\sqrt {7} \Pi \left (2;\frac {1}{2} (c+\pi +d x)|\frac {8}{7}\right )}{3 d}+\frac {\sqrt {3-4 \cos (c+d x)} \tan (c+d x)}{3 d}+\frac {\sqrt {3-4 \cos (c+d x)} \sec (c+d x) \tan (c+d x)}{6 d} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.24, antiderivative size = 140, normalized size of antiderivative = 1.00, number of steps
used = 7, number of rules used = 7, integrand size = 23, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.304, Rules used = {2881, 3134,
3138, 2733, 3081, 2741, 2885} \begin {gather*} \frac {F\left (\frac {1}{2} (c+d x+\pi )|\frac {8}{7}\right )}{3 \sqrt {7} d}-\frac {\sqrt {7} E\left (\frac {1}{2} (c+d x+\pi )|\frac {8}{7}\right )}{3 d}-\frac {\sqrt {7} \Pi \left (2;\frac {1}{2} (c+d x+\pi )|\frac {8}{7}\right )}{3 d}+\frac {\sqrt {3-4 \cos (c+d x)} \tan (c+d x)}{3 d}+\frac {\sqrt {3-4 \cos (c+d x)} \tan (c+d x) \sec (c+d x)}{6 d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 2733
Rule 2741
Rule 2881
Rule 2885
Rule 3081
Rule 3134
Rule 3138
Rubi steps
\begin {align*} \int \frac {\sec ^3(c+d x)}{\sqrt {3-4 \cos (c+d x)}} \, dx &=\frac {\sqrt {3-4 \cos (c+d x)} \sec (c+d x) \tan (c+d x)}{6 d}+\frac {1}{6} \int \frac {\left (6+3 \cos (c+d x)-2 \cos ^2(c+d x)\right ) \sec ^2(c+d x)}{\sqrt {3-4 \cos (c+d x)}} \, dx\\ &=\frac {\sqrt {3-4 \cos (c+d x)} \tan (c+d x)}{3 d}+\frac {\sqrt {3-4 \cos (c+d x)} \sec (c+d x) \tan (c+d x)}{6 d}+\frac {1}{18} \int \frac {\left (21-6 \cos (c+d x)+12 \cos ^2(c+d x)\right ) \sec (c+d x)}{\sqrt {3-4 \cos (c+d x)}} \, dx\\ &=\frac {\sqrt {3-4 \cos (c+d x)} \tan (c+d x)}{3 d}+\frac {\sqrt {3-4 \cos (c+d x)} \sec (c+d x) \tan (c+d x)}{6 d}+\frac {1}{72} \int \frac {(84+12 \cos (c+d x)) \sec (c+d x)}{\sqrt {3-4 \cos (c+d x)}} \, dx-\frac {1}{6} \int \sqrt {3-4 \cos (c+d x)} \, dx\\ &=-\frac {\sqrt {7} E\left (\frac {1}{2} (c+\pi +d x)|\frac {8}{7}\right )}{3 d}+\frac {\sqrt {3-4 \cos (c+d x)} \tan (c+d x)}{3 d}+\frac {\sqrt {3-4 \cos (c+d x)} \sec (c+d x) \tan (c+d x)}{6 d}+\frac {1}{6} \int \frac {1}{\sqrt {3-4 \cos (c+d x)}} \, dx+\frac {7}{6} \int \frac {\sec (c+d x)}{\sqrt {3-4 \cos (c+d x)}} \, dx\\ &=-\frac {\sqrt {7} E\left (\frac {1}{2} (c+\pi +d x)|\frac {8}{7}\right )}{3 d}+\frac {F\left (\frac {1}{2} (c+\pi +d x)|\frac {8}{7}\right )}{3 \sqrt {7} d}-\frac {\sqrt {7} \Pi \left (2;\frac {1}{2} (c+\pi +d x)|\frac {8}{7}\right )}{3 d}+\frac {\sqrt {3-4 \cos (c+d x)} \tan (c+d x)}{3 d}+\frac {\sqrt {3-4 \cos (c+d x)} \sec (c+d x) \tan (c+d x)}{6 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [C] Result contains complex when optimal does not.
time = 11.94, size = 236, normalized size = 1.69 \begin {gather*} \frac {-\frac {4 \sqrt {-3+4 \cos (c+d x)} F\left (\left .\frac {1}{2} (c+d x)\right |8\right )}{\sqrt {3-4 \cos (c+d x)}}+\frac {18 \sqrt {-3+4 \cos (c+d x)} \Pi \left (2;\left .\frac {1}{2} (c+d x)\right |8\right )}{\sqrt {3-4 \cos (c+d x)}}-\frac {2 i \left (21 E\left (i \sinh ^{-1}\left (\sqrt {3-4 \cos (c+d x)}\right )|-\frac {1}{7}\right )-12 F\left (i \sinh ^{-1}\left (\sqrt {3-4 \cos (c+d x)}\right )|-\frac {1}{7}\right )-8 \Pi \left (-\frac {1}{3};i \sinh ^{-1}\left (\sqrt {3-4 \cos (c+d x)}\right )|-\frac {1}{7}\right )\right ) \sin (c+d x)}{3 \sqrt {7} \sqrt {\sin ^2(c+d x)}}+\sqrt {3-4 \cos (c+d x)} (1+2 \cos (c+d x)) \sec (c+d x) \tan (c+d x)}{6 d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(407\) vs.
\(2(195)=390\).
time = 0.24, size = 408, normalized size = 2.91
method | result | size |
default | \(-\frac {\sqrt {-\left (8 \left (\cos ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-7\right ) \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}\, \left (-\frac {\cos \left (\frac {d x}{2}+\frac {c}{2}\right ) \sqrt {8 \left (\sin ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-\left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}}{3 \left (2 \left (\cos ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-1\right )^{2}}-\frac {2 \cos \left (\frac {d x}{2}+\frac {c}{2}\right ) \sqrt {8 \left (\sin ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-\left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}}{3 \left (2 \left (\cos ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-1\right )}+\frac {\sqrt {\frac {1}{2}-\frac {\cos \left (d x +c \right )}{2}}\, \sqrt {56 \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-7}\, \EllipticF \left (\cos \left (\frac {d x}{2}+\frac {c}{2}\right ), \frac {2 \sqrt {14}}{7}\right )}{21 \sqrt {8 \left (\sin ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-\left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}}-\frac {\sqrt {\frac {1}{2}-\frac {\cos \left (d x +c \right )}{2}}\, \sqrt {56 \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-7}\, \EllipticE \left (\cos \left (\frac {d x}{2}+\frac {c}{2}\right ), \frac {2 \sqrt {14}}{7}\right )}{3 \sqrt {8 \left (\sin ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-\left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}}-\frac {\sqrt {\frac {1}{2}-\frac {\cos \left (d x +c \right )}{2}}\, \sqrt {56 \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-7}\, \EllipticPi \left (\cos \left (\frac {d x}{2}+\frac {c}{2}\right ), 2, \frac {2 \sqrt {14}}{7}\right )}{3 \sqrt {8 \left (\sin ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-\left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}}\right )}{\sin \left (\frac {d x}{2}+\frac {c}{2}\right ) \sqrt {-8 \left (\cos ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+7}\, d}\) | \(408\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {\sec ^{3}{\left (c + d x \right )}}{\sqrt {3 - 4 \cos {\left (c + d x \right )}}}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \frac {1}{{\cos \left (c+d\,x\right )}^3\,\sqrt {3-4\,\cos \left (c+d\,x\right )}} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________